﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlChuyenNguoiBaoTro.ascx.cs" Inherits="WebUserControl_ControlChuyenNguoiBaoTro" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register src="uscTitleForm.ascx" tagname="uscTitleForm" tagprefix="uc1" %>
<%@ Register src="uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc1" %>


 <script type="text/javascript"> 
         function pageLoad() {
           
          $("#<%= btCheck.ClientID %>").click(function() {
        if($("#<%= txtMaBA.ClientID %>").val().length>0 && $("#<%= txtNguoiDangBaoTro.ClientID %>").val().length>0 && $("#<%= txtNguoiSeBaoTro.ClientID %>").val().length>0)
          { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
             } }); 
        }
        });
         $("#<%= btChuyenDoanhSo.ClientID %>").click(function() {
        if($("#<%= txtMaBA.ClientID %>").val().length>0 && $("#<%= txtNguoiDangBaoTro.ClientID %>").val().length>0 && $("#<%= txtNguoiSeBaoTro.ClientID %>").val().length>0)
          { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
             } }); 
        }
        });
         Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                        $.unblockUI();
                }
        } 
    </script> 
<style type="text/css">
.bt
{
	margin-left:10px;
}
   
</style>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<uc1:uscTitleForm ID="uscTitleForm1" runat="server" Messeage="Chuyển người bảo trợ" />

  <uc1:uscMsgBox ID="uscMsgBox1"  runat="server" />
<table>
  <tr>
    <td>TTPP</td>
    <td>
      <asp:DropDownList  width="200px" ID="DropTTPP"  runat="server">
    </asp:DropDownList>
    </td>
    <td></td>
    <td></td>
  </tr>
  
  <tr>
   <td>Mã BA</td>
                               
    <td><asp:TextBox ID="txtMaBA" width="100px"  runat="server"></asp:TextBox>
     <asp:RequiredFieldValidator ControlToValidate="txtMaBA" Display="None"  ID="RequiredFieldValidator1" runat="server" ErrorMessage="Phải nhập mã BA">
                                </asp:RequiredFieldValidator>
                                 <cc1:ValidatorCalloutExtender TargetControlID="RequiredFieldValidator1" ID="ValidatorCalloutExtender1" runat="server">
                                </cc1:ValidatorCalloutExtender>
    </td>
    <td>Họ tên</td>
    <td><asp:TextBox ID="txtHoTenBA" width="200px" ReadOnly="true"  BackColor="#ffff66"  runat="server"></asp:TextBox></td>
  </tr>
 <tr>
   <td>Người bảo trợ trực tiếp</td>
                               
    <td><asp:TextBox ID="txtNguoiDangBaoTro" width="100px"  runat="server"></asp:TextBox>
     <asp:RequiredFieldValidator ControlToValidate="txtNguoiDangBaoTro" Display="None"  ID="RequiredFieldValidator2" runat="server" ErrorMessage="Phải nhập mã người đang bảo trợ">
                                </asp:RequiredFieldValidator>
                                 <cc1:ValidatorCalloutExtender TargetControlID="RequiredFieldValidator2" ID="ValidatorCalloutExtender2" runat="server">
                                </cc1:ValidatorCalloutExtender>
    </td>
    <td>Họ tên</td>
    <td><asp:TextBox ID="txtTenNguoiDangBaoTro" width="200px" ReadOnly="true"  BackColor="#ffff66"  runat="server"></asp:TextBox></td>
  </tr>
  <tr>
  <td colspan="4">
  Chuyển cho 
  </td>
  </tr>
  <tr>
   <td>Người sẽ bảo trợ mới</td>
    <td><asp:TextBox ID="txtNguoiSeBaoTro" width="100px"  runat="server"></asp:TextBox>
      <asp:RequiredFieldValidator ControlToValidate="txtNguoiSeBaoTro" Display="None"  ID="RequiredFieldValidator3" runat="server" ErrorMessage="Phải nhập mã người sẽ bảo trợ">
                                </asp:RequiredFieldValidator>
                                 <cc1:ValidatorCalloutExtender TargetControlID="RequiredFieldValidator3" ID="ValidatorCalloutExtender3" runat="server">
                                </cc1:ValidatorCalloutExtender>
    </td>
    <td >Họ tên</td>
    <td><asp:TextBox ID="txtTenNBguoiSeBaoTro" width="200px" BackColor="#ffff66" ReadOnly="true" runat="server"></asp:TextBox></td>
  </tr>
  <tr>
    <td><asp:CheckBox ID="ChChuyenDoanhSoTu" Text="Chuyển toàn bộ tuyến dưới" runat="server" /></td>
      
    <td></td>
    <td></td>                          
  </tr>
</table>

<div>
<span class="bt"><asp:Button ID="btCheck" runat="server" Text="Kiểm tra" 
        onclick="btCheck_Click" /></span>
<span class="bt"><asp:Button ID="btChonLai" runat="server" Text="Chọn lại" 
        CausesValidation="false" onclick="btChonLai_Click" /></span>
<span class="bt">
    <asp:Button ID="btChuyenDoanhSo" runat="server" 
        Text="Chuyển" onclick="btChuyenDoanhSo_Click"  /></span>
<span class="bt"><asp:Button ID="btXoaManHinh" runat="server"  
        CausesValidation="false" Text="Xóa màn hình" onclick="btXoaManHinh_Click" 
         /></span>
</div>
</ContentTemplate>
</asp:UpdatePanel>